package com.hx.setting.model;

import com.hx.setting.model.GroupsModel.GroupsTableField;

/**
 * -- ==== --
 * CREATE TABLE `hx_groups` (
 * `id` bigint(20) NOT NULL AUTO_INCREMENT,
 * `group_name` varchar(100) DEFAULT NULL COMMENT '组名称',
 * `description` text COMMENT '组描述',
 * PRIMARY KEY (`id`),
 * UNIQUE KEY `groups_groupname_idx` (`group_name`)
 * ) ENGINE=InnoDB DEFAULT CHARSET=utf8
 * -- ==== --
 * Generate Date : 2014-03-16
 * Generate Version : v3.0
 * Generate Name : Honey v3.1 Test
 * Generate User : THINK
 * JDK Version : 1.5
 */
public final class GroupsModel extends GeneratedCriteria<GroupsModel, GroupsTableField>
{

	public static final String	TABLE_NAME		= "hx_groups";

	public static final String	DATABASE_VENDOR	= "Mysql-5.5";

	/**
	 * 
	 * 数据库字段枚举
	 */
	public enum GroupsTableField implements TableField
	{
		/** 
		 * id
		 */
		ID( new String[]
		{ "id", "id", "id " } ),
		/** 
		 * 组名称
		 */
		GROUPNAME( new String[]
		{ "group_name", "groupName", "组名称 " } ),
		/** 
		 * 组描述
		 */
		DESCRIPTION( new String[]
		{ "description", "description", "组描述 " } );

		/** 数据库字段名称 */
		private final String	value;

		/** 映射到java属性名称 */
		private final String	property;

		/** 数据库字段注释 */
		private final String	show;

		/** 
		 * 
		 * @param  value {@code   String}
		 * 
		 * @see    String
		 */
		private GroupsTableField(String args[])
		{
			this.value = args[0];
			this.property = args[1];
			this.show = args[2];
		}

		public static final GroupsTableField getInstance(String property)
		{
			GroupsTableField answer = null;
			if ( property != null )
			{
				int hash = property.hashCode();
				switch ( hash )
				{
					case 3355 : //id,id 
						answer = ID;
						break;
					case -1483174486 : //groupName,组名称 
						answer = GROUPNAME;
						break;
					case -1724546052 : //description,组描述 
						answer = DESCRIPTION;
						break;
				}
			}
			return answer;
		}

		/** 
		 * 获取数据库字段名称
		 * 
		 * @return {@code  Short}
		 */
		@Override
		public final String getValue()
		{
			return this.value;
		}

		/** 
		 * 获取映射对象属性名称
		 * 
		 * @return {@code  Short}
		 */
		@Override
		public final String getProperty()
		{
			return this.property;
		}

		/** 
		 * 获取字段显示名称(数据库字段注释)
		 * 
		 * @return {@code  String}
		 */
		@Override
		public final String getShow()
		{
			return this.show;
		}

		/** 
		 * 
		 * @return {@code  String}
		 */
		@Override
		public String toString()
		{
			return this.value;
		}
	}
}
/* Honey v3.1 Test - version:4 - OriginalChecksum:B1d3773e87b4d0dbd18dcaf3e9ffe93f6 (do not edit this line) */
